﻿@model IPagedList<SketchTour.Models.MSST00Models>
@using SketchTour.Paging;
@using SketchTour.Models
@using Resources;
@{
    ViewBag.Title = "Index";
}
<script type="text/javascript">
    function beginPaging(args) {
        // Animate
        $('#divList').fadeOut('normal');
    }
    function successPaging() {
        // Animate
        $('#divList').fadeIn('normal');
    }
    function failurePaging() {
        alert("Could not retrieve contacts.");
    }
    function CheckSession(data) {
        if (data.get_data() == '') {
            window.location.reload();
        }
    }
</script>
<!-- main start-->
<div id="main">
    <!-- InstanceBeginEditable name="EditRegion1" -->
    <h2>@Resource.MSST00_SCR_TiltleIndex</h2>
    <!-- InstanceEndEditable -->
    <div id="error" class="error">
        @if (!String.IsNullOrEmpty((string)TempData[SketchTour.Common.CData.MsgContent]))
        {
            @TempData[SketchTour.Common.CData.MsgContent]
        }
    </div>
    <div id="Div1" class="success">
    </div>
    <!-- InstanceBeginEditable name="EditRegion2" -->
    <p>
    </p>
    <p>
    </p>
    @using (Ajax.BeginForm("Index", SketchTour.Common.CData.ScreenID.MSST00, new AjaxOptions { UpdateTargetId = "divList" }))
    {
        <table class="inputForm">
            <tbody>
                <tr>
                    <th>
                        @Resource.MSST00_SCR_lblCode
                    </th>
                    <td>
                         @Html.TextBox(MSST00Key.Code, string.Empty, new { style = "width: 100px;" })
                    </td>
                    <th scope="row" style="width: 45px;">
                        @Resource.MSST00_SCR_lblType
                    </th>
                    <td>
                        @Html.DropDownList("StaffTypeID", null, string.Empty, new { style = "width: 100px;" })
                    </td>
                    <th width="103px">
                        @Resource.MSST00_SCR_lblNameVN
                    </th>
                    <td>
                         @Html.TextBox(MSST00Key.NameVN, string.Empty, new { style = "width: 100px;" })
                    </td>
                </tr>
                <tr>
                    <th>
                        @Resource.MSST00_SCR_lblNameEN
                    </th>
                    <td>
                         @Html.TextBox(MSST00Key.NameEN, string.Empty, new { style = "width: 100px;" })
                    </td>
                    <th width="103px">
                        @Resource.MSST00_SCR_lblTel
                    </th>
                    <td>
                         @Html.TextBox(MSST00Key.Tel, string.Empty, new { style = "width: 100px;" })
                    </td>
                    <th width="103px">
                        @Resource.MSST00_SCR_lblSex
                    </th>
                    <td>
                         @Html.DropDownList("Sex", null, String.Empty, new { style = "width:100px" })
                    </td>
                </tr>
                <tr>
                    <th width="103px">
                        @Resource.MSST00_SCR_lblEmail
                    </th>
                    <td colspan="2">
                         @Html.TextBox(MSST00Key.Email, string.Empty, new { style = "width: 210px;" })
                    </td>
                </tr>
            </tbody>
        </table>
        <input type="submit" value="@Resource.Common_SCR_btnSearch" />
    }
    
    <input type="button" value="@Resource.Common_SCR_btnAdd" onclick="location.href='MSST00/Add'" />
    @Html.Hidden("hdfRecordId")
    @using (Html.BeginForm("Edit", SketchTour.Common.CData.ScreenID.MSST00, FormMethod.Get))
    {
        @Html.Hidden("idEdit")  
        <input type="submit" value="@Resource.Common_SCR_btnEdit" onclick="return getValueEdit('idEdit');" />
    }
    @using (Html.BeginForm("Delete", SketchTour.Common.CData.ScreenID.MSST00))
    {
        @Html.Hidden("idDelete")  
        <input type="submit" value="@Resource.Common_SCR_btnDelete" onclick="return getValueDelete('idDelete');" />
    }
    <div id="divList">
        @Html.Partial("PVStaffList", Model)
    </div> 
</div>
<!-- main end-->
